home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!island!argv
- From: argv@island.uu.net (Dan Heller)
- Newsgroups: comp.sources.x
- Subject: v05i025: xpclock - pendulum clock , Part01/01
- Message-ID: <1186@island.uu.net>
- Date: 12 Nov 89 19:30:20 GMT
- Organization: Island Graphics, Marin County, California
- Lines: 839
- Approved: island!argv@sun.com
-
- Submitted-by: uunet!kddlab!isl.yamaha.co.jp!shutoh (Kazuhiko Shutoh)
- Posting-number: Volume 5, Issue 25
- Archive-name: xpclock/part01
-
-
-
-
-
- Dear Dan Heller
-
- Hello! Mr. Dan Heller.
- I am creating xpclock, pendulum clock for X11.
-
- Please examine it for distribute comp.sources.x.
-
-
- PS. This program is heavy CPU eater :-) but ok?
-
- Kazuhiko Shutoh
- shutoh%isl.yamaha.co.jp%kddlab@uunet.uu.net
-
-
- ----- CUT HERE ----- CUT HERE ----- CUT HERE ----- CUT HERE ----- CUT HERE --
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of shell archive."
- # Contents: Imakefile Makefile.simple README xpclock.c xpclock.h
- # xpclock.icon xpclock.man
- # Wrapped by shutoh@shako on Sat Nov 11 16:54:26 1989
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'Imakefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Imakefile'\"
- else
- echo shar: Extracting \"'Imakefile'\" \(813 characters\)
- sed "s/^X//" >'Imakefile' <<'END_OF_FILE'
- X# SCCS ID : @(#)Imakefile 1.5 11/11/89
- X#
- X# Imakefile - Imakefile for xpclock
- X#
- X# Author: Kazuhiko Shutoh, 1989.
- X#
- X# Permission to use, copy, modify and distribute without charge this
- X# software, documentation, images, etc. is granted, provided that this
- X# comment and the author's name is retained. The author assumes no
- X# responsibility for lost sleep as a consequence of use of this software.
- X#
- X# Send any comments, bug reports, etc. to: shutoh@isl.yamaha.co.jp or,
- X# for oversea: shutoh%isl.yamaha.co.jp%kddlab@uunet.uu.net
- X#
- X
- X
- X
- XLOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
- XSYS_LIBRARIES = -lm
- X
- XSRCS = xpclock.c xpclock.h xpclock.icon
- XOBJS = xpclock.o
- X
- X#CC = gcc
- XCC = cc
- X
- X#DEBUGFLAGS = -g
- XCDEBUGFLAGS = -O
- X
- XComplexProgramTarget(xpclock)
- X
- X
- X
- END_OF_FILE
- if test 813 -ne `wc -c <'Imakefile'`; then
- echo shar: \"'Imakefile'\" unpacked with wrong size!
- fi
- # end of 'Imakefile'
- fi
- if test -f 'Makefile.simple' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Makefile.simple'\"
- else
- echo shar: Extracting \"'Makefile.simple'\" \(868 characters\)
- sed "s/^X//" >'Makefile.simple' <<'END_OF_FILE'
- X# SCCS ID : @(#)Makefile.simple 1.3 11/1/89
- X#
- X# Makefile.simple - Simple Makefile for xpclock
- X#
- X# Author: Kazuhiko Shutoh, 1989.
- X#
- X# Permission to use, copy, modify and distribute without charge this
- X# software, documentation, images, etc. is granted, provided that this
- X# comment and the author's name is retained. The author assumes no
- X# responsibility for lost sleep as a consequence of use of this software.
- X#
- X# Send any comments, bug reports, etc. to: shutoh@isl.yamaha.co.jp or,
- X# for oversea: shutoh%isl.yamaha.co.jp%kddlab@uunet.uu.net
- X#
- X
- X#
- X# Libraries for X11R2
- X#
- X#LIBS = -lXaw -lXt -lX11 -lm
- X#
- X# Libraries for X11R3
- X#
- XLIBS = -lXaw -lXmu -lXt -lX11 -lm
- X
- Xxpclock: xpclock.o
- X cc -o xpclock xpclock.o $(LIBS)
- X
- Xxpclock.o: xpclock.c xpclock.h xpclock.icon
- X cc -c xpclock.c
- X
- X
- X
- X
- END_OF_FILE
- if test 868 -ne `wc -c <'Makefile.simple'`; then
- echo shar: \"'Makefile.simple'\" unpacked with wrong size!
- fi
- # end of 'Makefile.simple'
- fi
- if test -f 'README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'README'\"
- else
- echo shar: Extracting \"'README'\" \(1080 characters\)
- sed "s/^X//" >'README' <<'END_OF_FILE'
- XSCCS ID : @(#)README 1.1 11/11/89
- X
- X
- X Xpclock - Pendulum clock for X11
- X
- X
- X
- XTo Install:
- X
- X if you have imake, make Makefile from Imakefile and just type, "make".
- X or, simply type "make -f Makefile.simple"
- X or, manual compile "cc -o xpclock xpclock.c -lXaw -lXmu -lXt -lX11 -lm"
- X
- XXpclock worked on:
- X
- X SUN SUN 3 Series
- X SUN 3/60 + X640 X terminal
- X SUN 4 Series
- X
- X SONY NEWS 3800 Series (R3000 RISC NEWS)
- X NEWS 83* 84* (17**)
- X
- X ? Sequent Symmetry + NCD16 X terminal
- X
- X DEC DECStation 3100
- X VAX 8350 Ultrix V2.3
- X
- X OMRON LUNA UNIOS-U(System V)
- X
- X
- XCopyright notice and Author:
- X
- X Author: Kazuhiko Shutoh, 1989.
- X
- X Permission to use, copy, modify and distribute without charge this
- X software, documentation, images, etc. is granted, provided that this
- X comment and the author's name is retained. The author assumes no
- X responsibility for lost sleep as a consequence of use of this software.
- X
- X Send any comments, bug reports, etc. to: shutoh@isl.yamaha.co.jp or,
- X for oversea: shutoh%isl.yamaha.co.jp%kddlab@uunet.uu.net
- X
- X
- Xenjoy!!!
- X Kazuhiko Shutoh
- X
- X
- X
- END_OF_FILE
- if test 1080 -ne `wc -c <'README'`; then
- echo shar: \"'README'\" unpacked with wrong size!
- fi
- # end of 'README'
- fi
- if test -f 'xpclock.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xpclock.c'\"
- else
- echo shar: Extracting \"'xpclock.c'\" \(9763 characters\)
- sed "s/^X//" >'xpclock.c' <<'END_OF_FILE'
- Xstatic char sccsid[] = "@(#)xpclock.c 1.7 11/1/89";
- X/*
- X * xpclock.c - Pendulum Clock for X11
- X *
- X * Author: Kazuhiko Shutoh, 1989.
- X *
- X * Permission to use, copy, modify and distribute without charge this software,
- X * documentation, images, etc. is granted, provided that this comment and the
- X * author's name is retained. The author assumes no responsibility for lost
- X * sleep as a consequence of use of this software.
- X *
- X * Send any comments, bug reports, etc. to: shutoh@isl.yamaha.co.jp or, for
- X * oversea: shutoh%isl.yamaha.co.jp%kddlab@uunet.uu.net
- X *
- X */
- X
- X#include <X11/Xos.h>
- X#include <X11/Intrinsic.h>
- X#include <X11/StringDefs.h>
- X#include <X11/Shell.h>
- X#include <X11/Form.h>
- X#include <X11/Box.h>
- X#include <X11/Clock.h>
- X
- X#include <stdio.h>
- X#include <math.h>
- X
- X#include "xpclock.h"
- X#include "xpclock.icon"
- X
- XXtTimerCallbackProc MovePendulum();
- XXtCallbackProc RedrawPendulum();
- Xvoid DrawPendulum();
- XXtTimerCallbackProc DrawClockFace();
- Xvoid DrawClockArc();
- Xvoid ParseCommandLine();
- Xvoid Usage();
- X
- XWidget toplevel, base, pclock, clock, pendulum;
- XXPoint points[37];
- XGC gcPendulum;
- XGC gcClockface;
- X
- Xint pendulum_width, pendulum_height;
- Xint pendulum_x = 0, pendulum_y = 0;
- Xdouble pendulum_theta = 0;
- Xint pendulum_vector = 2;
- Xlong pendulum_update;
- Xunsigned char pendulum_flag;
- X
- Xmain(argc, argv)
- X int argc;
- X char **argv;
- X{
- X
- X Arg args[10];
- X Cardinal i;
- X XtTranslations newTranslations;
- X static XtActionsRec redrawActions[] = {
- X {"expose", (XtCallbackProc) RedrawPendulum},
- X {"resize", (XtCallbackProc) RedrawPendulum}};
- X
- X static char *overrideTranslations =
- X "<Expose>: expose() \n\
- X <ResReq>: expose()";
- X XGCValues gcv;
- X
- X toplevel = XtInitialize("xpclock", "XPclock", options, XtNumber(options), &argc, argv);
- X
- X /* Parse command line */
- X
- X ParseCommandLine(argc, argv);
- X
- X i = 0;
- X XtSetArg(args[0], XtNiconPixmap,
- X XCreateBitmapFromData(XtDisplay(toplevel),
- X XtScreen(toplevel)->root, xpclock_icon_bits,
- X xpclock_icon_width, xpclock_icon_height));
- X i++;
- X XtSetValues(toplevel, args, i);
- X
- X base = XtCreateManagedWidget("base", formWidgetClass,
- X toplevel, NULL, 0);
- X
- X i = 0;
- X XtSetArg(args[i], XtNborderWidth, 2); i++;
- X pclock = XtCreateManagedWidget("pclock", formWidgetClass,
- X base, args, i);
- X
- X i = 0;
- X XtSetArg(args[i], XtNheight, 100); i++;
- X XtSetArg(args[i], XtNwidth, 100); i++;
- X XtSetArg(args[i], XtNborderWidth, 0); i++;
- X clock = XtCreateManagedWidget("clock", clockWidgetClass,
- X pclock, args, i);
- X
- X /* Get GC for clock face */
- X
- X XtSetArg(args[0], XtNforeground, 0);
- X XtGetValues(clock, args, 1);
- X
- X gcv.foreground = args[0].value;
- X gcClockface = XtGetGC(clock, GCForeground, &gcv);
- X
- X XtSetArg(args[0], XtNbackground, 0);
- X XtGetValues(clock, args, 1);
- X args[0].name = "foreground";
- X XtSetValues(clock, args, 1);
- X
- X if (pendulum_flag == ON) {
- X
- X i = 0;
- X XtSetArg(args[i], XtNheight, 100); i++;
- X XtSetArg(args[i], XtNwidth, 100); i++;
- X XtSetArg(args[i], XtNfromVert, clock); i++;
- X pendulum = XtCreateManagedWidget("meter", boxWidgetClass,
- X pclock, args, i);
- X
- X /* Get GC for Pendulum */
- X
- X XtSetArg(args[0], XtNbackground, 0);
- X XtSetArg(args[1], XtNborderColor, 0);
- X XtGetValues(pendulum, args, 2);
- X
- X gcv.foreground = args[0].value;
- X gcv.background = args[0].value;
- X gcv.function = GXinvert;
- X gcPendulum = XtGetGC(pendulum, GCFunction, &gcv);
- X
- X }
- X
- X /* Override Expose / Resize Translation table */
- X
- X XtAddActions(redrawActions, XtNumber(redrawActions));
- X newTranslations = XtParseTranslationTable(overrideTranslations);
- X if (pendulum_flag == ON)
- X XtOverrideTranslations(pendulum, newTranslations);
- X XtOverrideTranslations(clock, newTranslations);
- X
- X /* Interval timer start */
- X
- X if (pendulum_flag == ON)
- X XtAddTimeOut(pendulum_update, MovePendulum, NULL);
- X XtAddTimeOut(CLOCKFACE_UPDATE, DrawClockFace, NULL);
- X
- X XtRealizeWidget(toplevel);
- X XtMainLoop();
- X
- X}
- X
- XXtTimerCallbackProc
- XMovePendulum(client_data, id)
- X caddr_t client_data;
- X XtIntervalId id;
- X{
- X
- X
- X Arg args[10];
- X static double old_pendulum_theta;
- X static int old_pendulum_x = 0;
- X static int old_pendulum_y = 0;
- X
- X if ((pendulum_x != 0) && (pendulum_y != 0)) {
- X old_pendulum_theta = pendulum_theta;
- X old_pendulum_x = pendulum_x;
- X old_pendulum_y = pendulum_y;
- X }
- X if ((pendulum_theta + pendulum_vector < 0) ||
- X (pendulum_theta + pendulum_vector > 45))
- X pendulum_vector = -pendulum_vector;
- X
- X pendulum_theta += (double) pendulum_vector;
- X
- X XtSetArg(args[0], XtNheight, 0);
- X XtSetArg(args[1], XtNwidth, 0);
- X XtGetValues(pendulum, args, 2);
- X
- X pendulum_height = args[0].value;
- X pendulum_width = args[1].value;
- X
- X pendulum_x = (int) (sin((pendulum_theta - 22.5) * PI / 180.0)
- X * pendulum_width * 0.7) + (pendulum_width / 2);
- X pendulum_y = (int) (cos((pendulum_theta - 22.5) * PI / 180.0)
- X * pendulum_height * 0.7);
- X
- X DrawPendulum(pendulum_x, pendulum_y, pendulum_theta);
- X
- X if ((old_pendulum_x != 0) && (old_pendulum_y != 0))
- X DrawPendulum(old_pendulum_x, old_pendulum_y, old_pendulum_theta);
- X
- X XtAddTimeOut(pendulum_update, MovePendulum, NULL);
- X
- X}
- X
- X
- XXtCallbackProc
- XRedrawPendulum(w, event, params, nparams)
- X Widget w;
- X XEvent *event;
- X String *params;
- X Cardinal *nparams;
- X{
- X
- X caddr_t dummy;
- X XtIntervalId dummy_id;
- X
- X if (pendulum_flag == ON) {
- X XClearWindow(XtDisplay(pendulum), XtWindow(pendulum));
- X DrawPendulum(pendulum_x, pendulum_y, pendulum_theta);
- X }
- X
- X DrawClockArc();
- X DrawClockFace(dummy, dummy_id);
- X
- X}
- X
- X
- Xvoid
- XDrawPendulum(offset_x, offset_y, theta)
- X int offset_x;
- X int offset_y;
- X double theta;
- X{
- X register double angle;
- X register double rsize;
- X register int count;
- X register int pendulum_size;
- X int arm_x, arm_y;
- X register int shade_count;
- X
- X pendulum_size = (pendulum_width < pendulum_height) ? pendulum_width : pendulum_height;
- X
- X /* Pendulum */
- X
- X for (angle = 0, count = 0; angle <= 360; angle += 10, count++) {
- X points[count].x = (short) (sin(angle * PI / 180.0)
- X * (double) (pendulum_size * 0.15) + (double) offset_x);
- X points[count].y = (short) (cos(angle * PI / 180.0)
- X * (double) (pendulum_size * 0.15) + (double) offset_y);
- X }
- X
- X XDrawLines(XtDisplay(pendulum), XtWindow(pendulum), gcPendulum,
- X points, count, CoordModeOrigin);
- X
- X /* Shade */
- X
- X for (rsize = 0.04, shade_count = 0; shade_count < 3; shade_count++, rsize += 0.03) {
- X for (angle = 0, count = 0; angle < 80; angle += 10, count++) {
- X points[count].x = (short) (sin(angle * PI / 180.0)
- X * (double) (pendulum_size * rsize) + (double) offset_x);
- X points[count].y = (short) (cos(angle * PI / 180.0)
- X * (double) (pendulum_size * rsize) + (double) offset_y);
- X }
- X XDrawLines(XtDisplay(pendulum), XtWindow(pendulum), gcPendulum,
- X points, count, CoordModeOrigin);
- X }
- X
- X /* Arm */
- X
- X arm_x = (short) (sin((157.5 + theta) * PI / 180.0)
- X * (double) (pendulum_size * 0.15) + (double) offset_x);
- X arm_y = (short) (cos((157.5 + theta) * PI / 180.0)
- X * (double) (pendulum_size * 0.15) + (double) offset_y);
- X
- X XDrawLine(XtDisplay(pendulum), XtWindow(pendulum), gcPendulum,
- X pendulum_width / 2, 0, arm_x, arm_y);
- X
- X}
- X
- X
- XXtTimerCallbackProc
- XDrawClockFace(client_data, id)
- X caddr_t client_data;
- X XtIntervalId id;
- X{
- X
- X Arg args[10];
- X double angle;
- X int segment_count;
- X int clock_height, clock_width;
- X int number_count;
- X int number_x, number_y;
- X int number_height, number_width;
- X
- X
- X XtSetArg(args[0], XtNheight, 0);
- X XtSetArg(args[1], XtNwidth, 0);
- X XtGetValues(clock, args, 2);
- X clock_height = args[0].value;
- X clock_width = args[1].value;
- X number_height = clock_height * 0.04;
- X number_width = clock_width * 0.04;
- X
- X for (angle = 150, number_count = 0; angle >= -180
- X ; angle -= 30, number_count++) {
- X number_x = sin(angle * PI / 180.0)
- X * (clock_width / 2) * 0.8 + (clock_width / 2);
- X number_y = cos(angle * PI / 180.0) * (clock_height / 2)
- X * 0.8 + (clock_height / 2);
- X
- X for (segment_count = 0; segment_count < 5; segment_count++) {
- X XDrawLine(XtDisplay(clock), XtWindow(clock), gcClockface,
- X number_x + (int) ((num_segments[number_count].segment[segment_count].x1) * number_width) - number_width,
- X number_y + (int) ((num_segments[number_count].segment[segment_count].y1) * number_height) - number_height,
- X number_x + (int) ((num_segments[number_count].segment[segment_count].x2) * number_width) - number_width,
- X number_y + (int) ((num_segments[number_count].segment[segment_count].y2) * number_height) - number_height);
- X }
- X }
- X
- X XtAddTimeOut(CLOCKFACE_UPDATE, DrawClockFace, NULL);
- X
- X}
- X
- Xvoid
- XDrawClockArc()
- X{
- X
- X Arg args[10];
- X int clock_height, clock_width;
- X
- X XtSetArg(args[0], XtNheight, 0);
- X XtSetArg(args[1], XtNwidth, 0);
- X XtGetValues(clock, args, 2);
- X clock_height = args[0].value;
- X clock_width = args[1].value;
- X
- X XDrawArc(XtDisplay(clock), XtWindow(clock), gcClockface, 0, 0, clock_width - 1, clock_height - 1, 0, 23040);
- X
- X}
- X
- X
- X
- Xvoid
- XParseCommandLine(ac, av)
- X int ac;
- X char **av;
- X{
- X
- X int count;
- X
- X /* Setup default */
- X
- X pendulum_flag = ON;
- X pendulum_update = 100;
- X
- X if (ac > 1)
- X for (count = 1; count < ac; count++) {
- X if ((strcmp("-pupdate", av[count]) == 0)
- X && (count + 1 <= ac))
- X pendulum_update = atol(av[++count]);
- X else if ((strcmp("-nopendulum", av[count]) == 0)
- X && (count + 1 <= ac)) {
- X pendulum_flag = OFF;
- X count++;
- X } else
- X Usage();
- X }
- X}
- X
- X
- Xvoid
- XUsage()
- X{
- X
- X fprintf(stderr, "xpclock <Toolkit Options> [-pupdate millisecond] [-nopendulum]\n");
- X
- X exit(-1);
- X
- X}
- END_OF_FILE
- if test 9763 -ne `wc -c <'xpclock.c'`; then
- echo shar: \"'xpclock.c'\" unpacked with wrong size!
- fi
- # end of 'xpclock.c'
- fi
- if test -f 'xpclock.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xpclock.h'\"
- else
- echo shar: Extracting \"'xpclock.h'\" \(2714 characters\)
- sed "s/^X//" >'xpclock.h' <<'END_OF_FILE'
- X/*
- X * SCCS ID : @(#)xpclock.h 1.2 11/1/89
- X *
- X * xpclock.h - Header for Pendulum Clock for X11
- X *
- X * Author: Kazuhiko Shutoh, 1989.
- X *
- X * Permission to use, copy, modify and distribute without charge this software,
- X * documentation, images, etc. is granted, provided that this comment and the
- X * author's name is retained. The author assumes no responsibility for lost
- X * sleep as a consequence of use of this software.
- X *
- X * Send any comments, bug reports, etc. to: shutoh@isl.yamaha.co.jp or, for
- X * oversea: shutoh%isl.yamaha.co.jp%kddlab@uunet.uu.net
- X *
- X */
- X
- X#define PI 3.141592654
- X
- X#define ON 1
- X#define OFF 0
- X
- X#define CLOCKFACE_UPDATE 5000
- X
- X/* Number vector :-) fonts */
- X
- Xtypedef struct {
- X double x1;
- X double y1;
- X double x2;
- X double y2;
- X} NumberSegment;
- X
- Xtypedef struct {
- X NumberSegment segment[5];
- X} NumberSegmentRec;
- X
- XNumberSegmentRec num_segments[12] = {
- X {
- X {0, 0, 0, 2}, /* 1 */
- X {0, 0, 0, 0},
- X {0, 0, 0, 0},
- X {0, 0, 0, 0},
- X {0, 0, 0, 0}
- X },
- X {
- X {0, 0, 0, 2}, /* 2 */
- X {1, 0, 1, 2},
- X {0, 0, 0, 0},
- X {0, 0, 0, 0},
- X {0, 0, 0, 0}
- X },
- X {
- X {0, 0, 0, 2}, /* 3 */
- X {1, 0, 1, 2},
- X {2, 0, 2, 2},
- X {0, 0, 0, 0},
- X {0, 0, 0, 0}
- X },
- X {
- X {0, 0, 0, 2}, /* 4 */
- X {1, 0, 1.5, 2},
- X {1.5, 2, 2, 0},
- X {0, 0, 0, 0},
- X {0, 0, 0, 0}
- X },
- X {
- X {0, 0, 0.5, 2}, /* 5 */
- X {0.5, 2, 1, 0},
- X {0, 0, 0, 0},
- X {0, 0, 0, 0},
- X {0, 0, 0, 0}
- X },
- X {
- X {0, 0, 0.5, 2}, /* 6 */
- X {0.5, 2, 1, 0},
- X {2, 0, 2, 2},
- X {0, 0, 0, 0},
- X {0, 0, 0, 0}
- X },
- X {
- X {0, 0, 0.5, 2}, /* 7 */
- X {0.5, 2, 1, 0},
- X {2, 0, 2, 2},
- X {3, 0, 3, 2},
- X {0, 0, 0, 0}
- X },
- X {
- X {0, 0, 0.5, 2}, /* 8 */
- X {0.5, 2, 1, 0},
- X {2, 0, 2, 2},
- X {3, 0, 3, 2},
- X {4, 0, 4, 2}
- X },
- X {
- X {0, 0, 0, 2}, /* 9 */
- X {1, 0, 2, 2},
- X {2, 0, 1, 2},
- X {0, 0, 0, 0},
- X {0, 0, 0, 0}
- X },
- X {
- X {0, 0, 1, 2}, /* 10 */
- X {0, 2, 1, 0},
- X {0, 0, 0, 0},
- X {0, 0, 0, 0},
- X {0, 0, 0, 0}
- X },
- X {
- X {0, 0, 1, 2}, /* 11 */
- X {0, 2, 1, 0},
- X {2, 0, 2, 2},
- X {0, 0, 0, 0},
- X {0, 0, 0, 0}
- X },
- X {
- X {0, 0, 1, 2}, /* 12 */
- X {0, 2, 1, 0},
- X {2, 0, 2, 2},
- X {3, 0, 3, 2},
- X {0, 0, 0, 0}
- X }
- X};
- X
- X/* Resource for Clock Widget */
- X
- Xstatic XrmOptionDescRec options[] = {
- X {"-chime", "*clock.chime", XrmoptionNoArg, "TRUE"},
- X {"-hd", "*clock.hands", XrmoptionSepArg, NULL},
- X {"-hands", "*clock.hands", XrmoptionSepArg, NULL},
- X {"-hl", "*clock.highlight", XrmoptionSepArg, NULL},
- X {"-highlight", "*clock.highlight", XrmoptionSepArg, NULL},
- X {"-update", "*clock.update", XrmoptionSepArg, NULL},
- X {"-padding", "*clock.padding", XrmoptionSepArg, NULL},
- X {"-d", "*clock.analog", XrmoptionNoArg, "FALSE"},
- X {"-digital", "*clock.analog", XrmoptionNoArg, "FALSE"},
- X {"-analog", "*clock.analog", XrmoptionNoArg, "TRUE"},
- X};
- END_OF_FILE
- if test 2714 -ne `wc -c <'xpclock.h'`; then
- echo shar: \"'xpclock.h'\" unpacked with wrong size!
- fi
- # end of 'xpclock.h'
- fi
- if test -f 'xpclock.icon' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xpclock.icon'\"
- else
- echo shar: Extracting \"'xpclock.icon'\" \(2003 characters\)
- sed "s/^X//" >'xpclock.icon' <<'END_OF_FILE'
- X/*
- X* SCCS ID : @(#)xpclock.icon 1.1 10/25/89
- X*
- X* xpclock.icon - icon bitmap data for xpclock
- X*
- X* Author: Kazuhiko Shutoh, 1989.
- X*
- X* Permission to use, copy, modify and distribute without charge this
- X* software, documentation, images, etc. is granted, provided that this
- X* comment and the author's name is retained. The author assumes no
- X* responsibility for lost sleep as a consequence of use of this software.
- X*
- X* Send any comments, bug reports, etc. to: shutoh@isl.yamaha.co.jp or,
- X* for oversea: shutoh%isl.yamaha.co.jp%kddlab@uunet.uu.net
- X*
- X*/
- X
- X
- X#define xpclock_icon_width 31
- X#define xpclock_icon_height 52
- Xstatic char xpclock_icon_bits[] = {
- X 0xff, 0xff, 0xff, 0x7f, 0x01, 0x00, 0x00, 0x40, 0xfd, 0xff, 0xff, 0x5f,
- X 0x05, 0x00, 0x00, 0x50, 0x05, 0x00, 0x00, 0x50, 0xfd, 0xff, 0xff, 0x5f,
- X 0x09, 0x00, 0x00, 0x48, 0x09, 0xf0, 0x07, 0x48, 0x09, 0x0c, 0x18, 0x48,
- X 0x09, 0x82, 0x20, 0x48, 0x09, 0x09, 0x48, 0x48, 0x89, 0x80, 0x80, 0x48,
- X 0x49, 0x80, 0x00, 0x49, 0x49, 0x81, 0x40, 0x49, 0x29, 0x80, 0x00, 0x4a,
- X 0x29, 0x80, 0x00, 0x4a, 0x29, 0x80, 0x00, 0x4a, 0xa9, 0xe0, 0xbf, 0x4a,
- X 0x29, 0x80, 0x00, 0x4a, 0x29, 0x80, 0x00, 0x4a, 0x29, 0x00, 0x00, 0x4a,
- X 0x49, 0x01, 0x40, 0x49, 0x49, 0x00, 0x00, 0x49, 0x89, 0x00, 0x80, 0x48,
- X 0x09, 0x09, 0x48, 0x48, 0x09, 0x82, 0x20, 0x48, 0x09, 0x0c, 0x18, 0x48,
- X 0x09, 0xf0, 0x07, 0x48, 0x09, 0x00, 0x00, 0x48, 0xe9, 0xff, 0xff, 0x4b,
- X 0x29, 0xc0, 0x00, 0x4a, 0x29, 0x60, 0x00, 0x4a, 0x29, 0x20, 0x00, 0x4a,
- X 0x29, 0x30, 0x00, 0x4a, 0x29, 0x10, 0x00, 0x4a, 0x29, 0x18, 0x00, 0x4a,
- X 0x29, 0x0e, 0x00, 0x4a, 0x29, 0x11, 0x00, 0x4a, 0xa9, 0x20, 0x00, 0x4a,
- X 0xa9, 0x20, 0x00, 0x4a, 0xa9, 0x20, 0x00, 0x4a, 0x29, 0x11, 0x00, 0x4a,
- X 0x29, 0x0e, 0x00, 0x4a, 0x29, 0x00, 0x00, 0x4a, 0xe9, 0xff, 0xff, 0x4b,
- X 0x09, 0x00, 0x00, 0x48, 0xfd, 0xff, 0xff, 0x5f, 0x05, 0x00, 0x00, 0x50,
- X 0x05, 0x00, 0x00, 0x50, 0xfd, 0xff, 0xff, 0x5f, 0x01, 0x00, 0x00, 0x40,
- X 0xff, 0xff, 0xff, 0x7f};
- END_OF_FILE
- if test 2003 -ne `wc -c <'xpclock.icon'`; then
- echo shar: \"'xpclock.icon'\" unpacked with wrong size!
- fi
- # end of 'xpclock.icon'
- fi
- if test -f 'xpclock.man' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xpclock.man'\"
- else
- echo shar: Extracting \"'xpclock.man'\" \(1857 characters\)
- sed "s/^X//" >'xpclock.man' <<'END_OF_FILE'
- X.TH XPCLOCK 1 "13 October 1988" "X Version 11"
- X.SH NAME
- Xxpclock - Pendulum clock for X
- X.SH SYNOPSIS
- X.B xpclock
- X[-\fItoolkitoption\fP ...] [-xclock-option ...] [-pupdate milliseconds] [-nopendulum]
- X.SH DESCRIPTION
- XThe
- X.I xpclock
- Xprogram displays the animate pendulum and time in analog form. The time is continuously
- Xupdated at a frequency which may be specified by the user. This program is
- Xusing the Athena Clock widget.
- X.SH OPTIONS
- X.I Xpclock
- Xaccepts all of the standard X Toolkit and Xclock command line options along with the
- Xadditional options listed below:
- X.TP 8
- X.B \-pupdate <milliseconds>
- XThis option indicates that set pendulum update timeout. The default is 100 milliseconds.
- X.TP 8
- X.B \-nopendulum
- XThis option indicates that turn off pendulum.
- X.SH X DEFAULTS
- XThis program uses the
- X.I Clock
- Xwidget in the X Toolkit. It understands all of the core resource names and
- Xclasses.
- X.PP
- X.SH "SEE ALSO"
- XX(1), xclock(1), xrdb(1), time(3C), Athena Clock widget
- X.SH BUGS
- X.I Xpclock
- Xbelieves the system clock.
- X.PP
- X.I Xpclock
- Xis CPU eater. sorry.
- X.PP
- XDigital mode (-digital) does not work. sorry. (but why?)
- X.SH "COPYRIGHT NOTICE"
- X.PP
- XPermission to use, copy, modify and distribute without charge this
- Xsoftware, documentation, images, etc. is granted, provided that this
- Xcomment and the author's name is retained. The author assumes no
- Xresponsibility for lost sleep as a consequence of use of this software.
- X.PP
- XSend any comments, bug reports, etc. to: shutoh@isl.yamaha.co.jp or,
- Xfor oversea: shutoh%isl.yamaha.co.jp%kddlab@uunet.uu.net
- X.br
- XSee \fIX(1)\fP for a full statement of rights and permissions.
- X.SH AUTHORS
- X
- Xxclock :
- X.br
- XTony Della Fera (MIT-Athena, DEC)
- X.br
- XDave Mankins (MIT-Athena, BBN)
- X.br
- XEd Moy (UC Berkeley)
- X.br
- Xxpclock:
- X.br
- XKazuhiko Shutoh
- Xshutoh@isl.yamaha.co.jp or,
- Xfor oversea: shutoh%isl.yamaha.co.jp%kddlab@uunet.uu.net
- X
- END_OF_FILE
- if test 1857 -ne `wc -c <'xpclock.man'`; then
- echo shar: \"'xpclock.man'\" unpacked with wrong size!
- fi
- chmod +x 'xpclock.man'
- # end of 'xpclock.man'
- fi
- echo shar: End of shell archive.
- exit 0
-